using System;
using UnityEngine;
public class SRayVEx:IVEx
{
public void SetData(ComponentData d){Debug.Assert(TargetType.IsAssignableFrom(d.ComponentType));_data=new WeakReference<ComponentData>(d);}
public SRayVEx(ComponentData d){SetData(d);}
public SRayVEx(){}
WeakReference<ComponentData> _data;
public UInt32 CompIdentity{get{if(_data.TryGetTarget(out ComponentData data))return data.CompIdentity;else throw new NullReferenceException("弱引用未找到");}}
public  Type TargetType=>typeof(SRay);
public ComponentData Data{get{if(_data.TryGetTarget(out ComponentData data))return data;
else throw new NullReferenceException("弱引用未找到");}}
public UnityEngine.Vector3 LocalPosition {get{if(_data.TryGetTarget(out ComponentData data))return data.GetValue<UnityEngine.Vector3>(0);else throw new NullReferenceException("弱引用未找到");}
set{if(_data.TryGetTarget(out ComponentData data))data.SetValue<UnityEngine.Vector3>(0,value,true);else throw new NullReferenceException("弱引用未找到");}}
public static ushort LocalPositionId{get=>(ushort)0;}
public System.Single LocalRotation {get{if(_data.TryGetTarget(out ComponentData data))return data.GetValue<System.Single>(1);else throw new NullReferenceException("弱引用未找到");}
set{if(_data.TryGetTarget(out ComponentData data))data.SetValue<System.Single>(1,value,true);else throw new NullReferenceException("弱引用未找到");}}
public static ushort LocalRotationId{get=>(ushort)1;}
public System.Boolean LocalIsFliped {get{if(_data.TryGetTarget(out ComponentData data))return data.GetValue<System.Boolean>(2);else throw new NullReferenceException("弱引用未找到");}
set{if(_data.TryGetTarget(out ComponentData data))data.SetValue<System.Boolean>(2,value,true);else throw new NullReferenceException("弱引用未找到");}}
public static ushort LocalIsFlipedId{get=>(ushort)2;}
public System.Single DamageGap {get{if(_data.TryGetTarget(out ComponentData data))return data.GetValue<System.Single>(3);else throw new NullReferenceException("弱引用未找到");}
set{if(_data.TryGetTarget(out ComponentData data))data.SetValue<System.Single>(3,value,true);else throw new NullReferenceException("弱引用未找到");}}
public static ushort DamageGapId{get=>(ushort)3;}
public System.Int32 Power {get{if(_data.TryGetTarget(out ComponentData data))return data.GetValue<System.Int32>(4);else throw new NullReferenceException("弱引用未找到");}
set{if(_data.TryGetTarget(out ComponentData data))data.SetValue<System.Int32>(4,value,true);else throw new NullReferenceException("弱引用未找到");}}
public static ushort PowerId{get=>(ushort)4;}
public UnityEngine.Vector2 Size {get{if(_data.TryGetTarget(out ComponentData data))return data.GetValue<UnityEngine.Vector2>(5);else throw new NullReferenceException("弱引用未找到");}
set{if(_data.TryGetTarget(out ComponentData data))data.SetValue<UnityEngine.Vector2>(5,value,true);else throw new NullReferenceException("弱引用未找到");}}
public static ushort SizeId{get=>(ushort)5;}

}
